<template>
  <div class="goinOrder">
    <div class="buyingIfor goinOrder">
      <template v-for="(i,index) in dataList">
        <el-card shadow="hover" :key="index">
          <div class="title" v-if="ShopOrGoods">{{i.mendian}}</div>
          <div>
            <template v-for="(item,index1) in btn">
              <el-button
                :key="index1"
                @click="handler(index1,index)"
                v-if="item.isShow"
                type="primary"
                style="margin:0 10px 0px 0"
                :size="item.size"
              >{{item.title}}</el-button>
            </template>
            <div class="total">
              <div>
                <span>共</span>
                <span>{{total.number}}</span>
                <span>种商品</span>
              </div>
              <div>
                <el-input
                  placeholder="商品名称或条码"
                  v-model="search.info"
                  class="input-with-select"
                  style="width:250px"
                >
                  <el-button slot="append" icon="el-icon-search"></el-button>
                </el-input>
              </div>
            </div>
            <avue-crud
              ref="index"
              style="width:100%"
              :data="i.loadData"
              :option="tableOption"
              :table-loading="loading"
            >
              <!-- <template slot="bh" slot-scope="scope">
                <el-button type="text" @click="del(scope.row)">{{scope.row.bh}}（{{scope.row.hs}}ml）</el-button>
              </template>
              <template slot="hy" slot-scope="scope">
                <el-input v-model="scope.row.hy">
                  <template slot="append">{{scope.row.dw}}</template>
                </el-input>
              </template>-->
              <template slot="dh1" slot-scope="scope">
                <el-input v-model="scope.row.dh"></el-input>
              </template>
              <!-- <template slot="menu" slot-scope="scope">
                <el-button type="text" icon="el-icon-remove" @click="del(scope.row)">移除</el-button>
              </template>-->
            </avue-crud>
            <choiceGoods ref="choiceGoods" @trigger="trigger" />
          </div>
        </el-card>
      </template>
    </div>
  </div>
</template>

<script src='./buyingIfor.js'></script>

<style lang="scss">
.goinOrder {
  .buyingIfor {
    .title {
      padding: 0 0 20px 0;
      font-weight: 500;
      font-size: 24px;
    }
    .total {
      margin: 20px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      span:nth-child(even) {
        font-weight: 600;
        font-size: 25px;
      }
      span:nth-child(odd) {
        font-size: 20px;
      }
    }
  }
}
</style>